<?php
namespace App\Http\Middleware;

use Closure;
//判断是否登录
class HomeLogin 
{
	public function handle($request,Closure $next)
	{

		
		// $key = 'login_user';
		if(null == session()->get('login_homeuser')){

			echo "<script>alert('您未登录请登录');window.location.href='/login'</script>";
			// return redirect('/admin/login');
		}

		return $next($request);
	}
}






















?>